package com.fausto.learnimprint.core.model.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author fausto
 * @since 2022-03-28
 */
@TableName("blog")
public class Blog implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 唯一博文id--主键
     */
    @TableId(value = "blog_id", type = IdType.AUTO)
    private Integer blogId;

    /**
     * 博文标题
     */
    private String blogTitle;

    /**
     * 博文内容
     */
    private String blogBody;

    /**
     * 博文评论数
     */
    @TableField("blog_discussCount")
    private Integer blogDiscussCount;

    /**
     * 博文浏览数
     */
    @TableField("blog_blogViews")
    private Integer blogBlogViews;

    /**
     * 博文发布时间
     */

    private LocalDateTime blogTime;

    /**
     * 博文状态--0 删除 1正常
     */
    @TableLogic(value = "1", delval = "0")
    private Integer blogState;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 博文点赞总数
     */
    private Integer likeCount;

    public Integer getBlogId() {
        return blogId;
    }

    public void setBlogId(Integer blogId) {
        this.blogId = blogId;
    }

    public String getBlogTitle() {
        return blogTitle;
    }

    public void setBlogTitle(String blogTitle) {
        this.blogTitle = blogTitle;
    }

    public String getBlogBody() {
        return blogBody;
    }

    public void setBlogBody(String blogBody) {
        this.blogBody = blogBody;
    }

    public Integer getBlogDiscussCount() {
        return blogDiscussCount;
    }

    public void setBlogDiscussCount(Integer blogDiscussCount) {
        this.blogDiscussCount = blogDiscussCount;
    }

    public Integer getBlogBlogViews() {
        return blogBlogViews;
    }

    public void setBlogBlogViews(Integer blogBlogViews) {
        this.blogBlogViews = blogBlogViews;
    }

    public LocalDateTime getBlogTime() {
        return blogTime;
    }

    public void setBlogTime(LocalDateTime blogTime) {
        this.blogTime = blogTime;
    }

    public Integer getBlogState() {
        return blogState;
    }

    public void setBlogState(Integer blogState) {
        this.blogState = blogState;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getLikeCount() {
        return likeCount;
    }

    public void setLikeCount(Integer likeCount) {
        this.likeCount = likeCount;
    }

    @Override
    public String toString() {
        return "Blog{" +
                "blogId=" + blogId +
                ", blogTitle=" + blogTitle +
                ", blogBody=" + blogBody +
                ", blogDiscussCount=" + blogDiscussCount +
                ", blogBlogViews=" + blogBlogViews +
                ", blogTime=" + blogTime +
                ", blogState=" + blogState +
                ", userId=" + userId +
                ", likeCount=" + likeCount +
                "}";
    }
}
